const path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}

// const CompressionPlugin = require('compression-webpack-plugin')
// const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i

// const UglifyJsPlugin = require('uglifyjs-webpack-plugin')

module.exports = {
  productionSourceMap: false,
  publicPath: './',
  chainWebpack: config => {
    config.resolve.alias
    //   .set('vue$', 'vue/dist/vue.esm.js')
      .set('@', resolve('src'))
      .set('~utils', resolve('src/utils'))
  },
  devServer: {
    port: 5000
  }
}
